package com.glb.gilibuy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * product_category
 * @author 
 */
@ApiModel(value="com.glb.gilibuy.entity.ProductCategory商品分类表")
@Data
public class ProductCategory implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 商品分类id
     */
    @ApiModelProperty(value="商品分类id")
    private String productCategoryId;

    /**
     * 父分类id
     */
    @ApiModelProperty(value="父分类id")
    private String parentCategoryId;

    /**
     * 商品分类名称
     */
    @ApiModelProperty(value="商品分类名称")
    private String productCategoryName;

    /**
     * 商品分类排序权重：0 - 999
     */
    @ApiModelProperty(value="商品分类排序权重：0 - 999")
    private Integer productCategorySequence;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductCategory other = (ProductCategory) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProductCategoryId() == null ? other.getProductCategoryId() == null : this.getProductCategoryId().equals(other.getProductCategoryId()))
            && (this.getParentCategoryId() == null ? other.getParentCategoryId() == null : this.getParentCategoryId().equals(other.getParentCategoryId()))
            && (this.getProductCategoryName() == null ? other.getProductCategoryName() == null : this.getProductCategoryName().equals(other.getProductCategoryName()))
            && (this.getProductCategorySequence() == null ? other.getProductCategorySequence() == null : this.getProductCategorySequence().equals(other.getProductCategorySequence()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProductCategoryId() == null) ? 0 : getProductCategoryId().hashCode());
        result = prime * result + ((getParentCategoryId() == null) ? 0 : getParentCategoryId().hashCode());
        result = prime * result + ((getProductCategoryName() == null) ? 0 : getProductCategoryName().hashCode());
        result = prime * result + ((getProductCategorySequence() == null) ? 0 : getProductCategorySequence().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productCategoryId=").append(productCategoryId);
        sb.append(", parentCategoryId=").append(parentCategoryId);
        sb.append(", productCategoryName=").append(productCategoryName);
        sb.append(", productCategorySequence=").append(productCategorySequence);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}